import Vue from 'vue'
import App from './App.vue'
import router from './router'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import './assets/css/global.css'
import Md5 from 'md5-hex'
import axios from 'axios'
import Moment from 'moment'
import echarts from "echarts";

axios.defaults.baseURL="/api";

/*axios.interceptors.request.use((req)=>{
  let token=sessionStorage.getItem("token");
  if(token!=null){
    req.headers.token=token;
  }
  return req;
});*/

Vue.config.productionTip = false
Vue.use(ElementUI);
Vue.prototype.$http=axios
Vue.prototype.$md5=Md5
Vue.prototype.$echarts=echarts
Vue.prototype.$moment=Moment
Vue.use(Moment)
Vue.filter('datefmt',function(data,formatStr){
  return Moment(data).format(formatStr);
});

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
